package com.example.service;


import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

/**
 * @author chentao
 * @create 2023/3/11 15:53
 * @since 1.0.0
 */
public interface BaseService<T> {

    public T add(T entity);

    public void delete(T entity);

    public void deleteById(Long id);

    public T getById(Long id, Boolean noLazy);

    public T getById(Long id);

    public Sort getSort(T entity);

    public Pageable getPageable(T entity);

    public Example<T> initSetting(T entity);

    public Page<T> findPage(T entity);

    public String getEntityName();

}